extern crate serde;
extern crate serde_json;

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct Article{
    pub apk_link :String,
    pub audit: i32,
    pub author: String,
    pub chapter_id:i32,
    pub chapter_name: String,
    pub item_collect: bool,
    pub course_id: i32,
    pub item_desc: String,
    pub envelope_pic: String,
    pub fresh: bool,  //10
    pub id: i32,
    pub item_link: String,
    pub nice_date: String,
    pub nice_share_date: String,
    pub origin: String,
    pub prefix: String,
    pub project_link: String,
    pub publish_time: i64,
    pub share_date: String,
    pub share_user: String, //20
    pub super_chapter_id: i32,
    pub super_chapter_name: String,
    //pub tags: MutableList<Tag>,
    pub title: String,
    pub item_type: i32,
    pub user_id: i32,
    pub visible: i32,
    pub zan: i32,
    pub top: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ArticleTopData{
    pub data:Option<Vec<Article>>,
    pub error_code:i32,
    pub error_msg:String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ArticleListData{
    pub cur_page:i32,
    pub datas:Option<Vec<Article>>,
    pub offset:i32,
    pub over:bool,
    pub page_count:i32,
    pub size:i32,
    pub total:i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ArticlePageData{
    pub data:ArticleListData,
    pub error_code:i32,
    pub error_msg:String,
}
